package com.wkbb.basic.mapper;

import com.wkbb.basic.model.Family;
import com.wkbb.basic.vo.FamilyManagePageListVo;
import com.wkbb.common.base.BaseMapper;
import com.wkbb.common.dto.basic.FamilyInfoDto;
import com.wkbb.common.dto.basic.NickNameDto;
import com.wkbb.common.dto.im.FacultyAddressBookDto;
import com.wkbb.common.dto.im.FamilyAddressBookDto;
import com.wkbb.common.dto.im.ImUserNum;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface FamilyMapper extends BaseMapper<Family> {

    FamilyInfoDto getFamilyInfoById(Long id);

    List<FamilyInfoDto> getFamilyInfoPageList(Map<String, Object> params);

    FamilyInfoDto getFamilyInfoByMapParams(Map<String, Object> params);

    List<FamilyInfoDto> getFamilyInfoList(Map<String, Object> params);

    List<Family> getAllUserListByMapParams(Map<String, Object> params);

    List<FamilyInfoDto> getFamilyInfoListByClassId(Map<String, Object> params);

    List<FamilyManagePageListVo> getFamilyManagePageList(Map<String, Object> params);

    List<FamilyInfoDto> getFamilyStudentList(Map<String, Object> params);

    List<FacultyAddressBookDto> getFamilyAddressBook(Map<String, Object> params);

    NickNameDto getNickName(NickNameDto nickNameDto);

    List<FamilyAddressBookDto> getFamilyAddressBookDto(Map<String, Object> params);

    /**
     * 根据家长userId查询家长列表
     *
     * @param params
     * @return
     */
    List<FamilyInfoDto> getFamilyListByFamily(Map<String, Object> params);

    List<Family> getByUserId(@Param("userId") Long userId);

    List<Family> getFamilyListUniqueByOrgId(Long orgId);

    void updateBack(Family family);

    FamilyInfoDto getFamilyInfoByMobile(Map<String, Object> params);

    //TODO 后面要把家长删除改成这个（未测）
    void deleteFamily(Map<String, Object> params);

    List<Map<String, Object>> getFamilyCountStatByOrgId(Long orgId);

    Integer getFamilyCount(Map<String, Object> params);

    List<ImUserNum> getFamilyList(Map<String, Object> params);

    List<Family> getFamilyListByUserIds(Map<String, Object> params);

    List<Family> getFamilyListByUpdateTime(Map<String, Object> params);

    List<Long> getFamilyAll(Map<String, Object> params);
    /**
     * 根据学生userId查询家长列表
     * @param params
     * @return
     */
    List<FamilyInfoDto> getFamilyListByStudent(Map<String, Object> params);
	
    void updateSmart(Family family);

    List<FamilyInfoDto> getFamilyListByFamilySmartUserId(Map<String, Object> params);

    Map<String, Object> statFamilyInfo(Map<String, Object> params);

    List<Family> getFamilyErrorImList(Map<String, Object> params);

    List<Family> getErrorFamilyList(Map<String, Object> params);

    void updateFaceFlagBatch(@Param("list")List<Family> list);

    List<Family> getFamilyListByPage(Map<String, Object> params);
}